<template>
    <div class="zong1" v-if="list[0]">
        <div>
            <van-nav-bar :title="list[0].name1">
                <template #left>
                    <van-icon name="arrow-left" color="#000" size="20" @click="Goshouye1" />
                </template>

            </van-nav-bar>
        </div>
        <div class="main_1">
            <img :src="list[0].tu1">
            <p>&emsp;&emsp;{{list[0].dec1}}</p>
        </div>
        <div class="miaoshu">{{list[0].dec2}}</div>
        <div>
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <img :src="list[0].tu2" />
                    </div>
                    <div class="swiper-slide">
                        <img :src="list[0].tu3" />
                    </div>
                    <div class="swiper-slide">
                        <img :src="list[0].tu4" />
                    </div>
                    <div class="swiper-slide">
                        <img :src="list[0].tu5" />
                    </div>
                    <div class="swiper-slide">
                        <img :src="list[0].tu6" />
                    </div>
                    <div class="swiper-slide">
                        <img :src="list[0].tu7" />
                    </div>
                </div>
            </div>
        </div>
        <hr>
        <div>

        </div>
    </div>
</template>
<script>
import 'swiper/dist/css/swiper.css'
import Swiper from 'swiper'
export default {
    data() {
        return {
            img14: require('./img/image14.jpg'),
            list: []
        }
    },
    methods: {
        Goshouye1() {
            this.$router.go(-1)
        }
    },
    mounted() {
        const arr = this.$store.state.likes
        this.list = arr.filter(item => {
            return item.Id == this.$route.params.lid
        })
        this.$nextTick(() => {
            var swiper = new Swiper('.swiper-container', {
                slidesPerView: 3,
                spaceBetween: 30,
                centeredSlides: true,
                slideToClickedSlide: true,

            });
        })

    }
}
</script>
<style scoped>
.swiper-slide>img {
    width: 150px;
    height: 160px;
}

.swiper-container {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;

    /* Center slide text vertically */
    display: -webkit-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    -webkit-align-items: center;
    align-items: center;
    transition: 300ms;
    transform: scale(0.8);
}

.swiper-slide-active,
.swiper-slide-duplicate-active {
    transform: scale(1);
}

.miaoshu {
    height: 30px;
    line-height: 30px;
    margin: 10px 10px 0;
    font-weight: 900;
}

.main_1 {
    width: 100%;

}

.main_1>p {
    margin-top: 15px;
}

.main_1>img {
    width: 130px;
    height: 170px;
    margin: 15px 15px;
    float: left;
}

* {
    margin: 0;
    padding: 0;
}
</style>
